We program defensively:
‘defensive programming’ describes a way programming giving users of an API detailed error messages when they use it wrong, for instance (but not limited to) by checking input arguments. This might lead to less bugs. For example, a method may return useable, but false values. Defensive programming would check the input arguments and throw an exception and prevent the programmer from continuing with false values.
equals(Object)
and hashCode()
should be implemented using them (see lang3.Validate
and lang3.builder.*
).All parts of the Javadoc are written as full sentences, including that they begin with a capital letter and end with a full stop.
Naming Convention
. They are not capitalised.@param
and @returns
tags have to state their value ranges if they refer to primitive data types as well as stating whether they can be null
and the meaning of them being null
if they refer to object data types.{@link}
or {@see}
tags is forbidden.